<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="zh-CN"><link href="stylesheet.css" media="all" rel="stylesheet" type="text/css">
<title>日期/时间关键字</title>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head><body class="SECT1">
<div>
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="5" align="center" valign="bottom">PostgreSQL 8.2.3 中文文档</th></tr>
<tr><td width="10%" align="left" valign="top"><a href="x71115.html" accesskey="P">后退</a></td><td width="10%" align="left" valign="top"><a href="datetime-appendix.html">快退</a></td><td width="60%" align="center" valign="bottom">附录B. 日期/时间支持</td><td width="10%" align="right" valign="top"><a href="datetime-appendix.html">快进</a></td><td width="10%" align="right" valign="top"><a href="datetime-config-files.html" accesskey="N">前进</a></td></tr>
</table>
<hr align="LEFT" width="100%"></div>
<div class="SECT1"><h1 class="SECT1"><a name="DATETIME-KEYWORDS">B.2. 日期/时间关键字</a></h1>
<p><a href="datetime-keywords.html#DATETIME-MONTH-TABLE">表B-1</a>显示了被当做月份名字缩写的记号。</p>
<div class="TABLE"><a name="DATETIME-MONTH-TABLE"></a>
<p><b>表B-1. 月份名</b></p>
<table border="1" class="CALSTABLE"><col><col>
<thead>
<tr><th>月份</th><th>缩写</th></tr>
</thead>
<tbody>
<tr><td>January</td><td>Jan</td></tr>
<tr><td>February</td><td>Feb</td></tr>
<tr><td>March</td><td>Mar</td></tr>
<tr><td>April</td><td>Apr</td></tr>
<tr><td>May</td><td>&nbsp;</td></tr>
<tr><td>June</td><td>Jun</td></tr>
<tr><td>July</td><td>Jul</td></tr>
<tr><td>August</td><td>Aug</td></tr>
<tr><td>September</td><td>Sep, Sept</td></tr>
<tr><td>October</td><td>Oct</td></tr>
<tr><td>November</td><td>Nov</td></tr>
<tr><td>December</td><td>Dec</td></tr>
</tbody>
</table>
</div>
<p><a href="datetime-keywords.html#DATETIME-DOW-TABLE">表B-2</a>显示了被识别为星期几的名字。</p>
<div class="TABLE"><a name="DATETIME-DOW-TABLE"></a>
<p><b>表B-2. 星期几的名字</b></p>
<table border="1" class="CALSTABLE"><col><col>
<thead>
<tr><th>星期</th><th>缩写</th></tr>
</thead>
<tbody>
<tr><td>Sunday</td><td>Sun</td></tr>
<tr><td>Monday</td><td>Mon</td></tr>
<tr><td>Tuesday</td><td>Tue, Tues</td></tr>
<tr><td>Wednesday</td><td>Wed, Weds</td></tr>
<tr><td>Thursday</td><td>Thu, Thur, Thurs</td></tr>
<tr><td>Friday</td><td>Fri</td></tr>
<tr><td>Saturday</td><td>Sat</td></tr>
</tbody>
</table>
</div>
<p><a href="datetime-keywords.html#DATETIME-MOD-TABLE">表B-3</a>显示了用于各种修饰用途的记号。</p>
<div class="TABLE"><a name="DATETIME-MOD-TABLE"></a>
<p><b>表B-3. 日期/时间字段修饰词</b></p>
<table border="1" class="CALSTABLE"><col><col>
<thead>
<tr><th>标识符</th><th>描述</th></tr>
</thead>
<tbody>
<tr><td><tt class="LITERAL">ABSTIME</tt></td><td>忽略</td></tr>
<tr><td><tt class="LITERAL">AM</tt></td><td>12:00 之前的时间</td></tr>
<tr><td><tt class="LITERAL">AT</tt></td><td>忽略</td></tr>
<tr><td><tt class="LITERAL">JULIAN</tt>, <tt class="LITERAL">JD</tt>, <tt class="LITERAL">J</tt></td><td>下一字段是儒略日期</td></tr>
<tr><td><tt class="LITERAL">ON</tt></td><td>忽略</td></tr>
<tr><td><tt class="LITERAL">PM</tt></td><td>12:00 以及之后的时间</td></tr>
<tr><td><tt class="LITERAL">T</tt></td><td>下一个字段是时间</td></tr>
</tbody>
</table>
</div>
<p>关键字 <tt class="LITERAL">ABSTIME</tt> 被忽略是由于历史原因：在非常老的 PostgreSQL 版本里，类型为 <tt class="TYPE">abstime</tt> 的非法字段会被当做 <tt class="LITERAL">Invalid Abstime</tt> 发出。不过现在不再是这样了，并且这个关键字可能在未来版本中被删除。</p>
</div>
<div>
<hr align="LEFT" width="100%">
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="33%" align="left" valign="top"><a href="x71115.html" accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">首页</a></td><td width="33%" align="right" valign="top"><a href="datetime-config-files.html" accesskey="N">前进</a></td></tr>
<tr><td width="33%" align="left" valign="top">日期/时间输入解析</td><td width="34%" align="center" valign="top"><a href="datetime-appendix.html" accesskey="U">上一级</a></td><td width="33%" align="right" valign="top">日期/时间配置文件</td></tr>
</table>
</div>
</body></html>